#include "Bullet3Common/b3Matrix3x3.h"
#ifdef __cplusplus
extern "C" {
#endif
b3Matrix3x3FloatData* bullet_Newb3Matrix3x3FloatData(){
	b3Matrix3x3FloatData* wrap_out = new b3Matrix3x3FloatData();
	return wrap_out;
}

b3Vector3FloatData** bullet_b3Matrix3x3FloatData_GetFieldOfM_el(b3Matrix3x3FloatData* c_this){
	return (b3Vector3FloatData**)(&c_this->m_el);
}

b3Matrix3x3DoubleData* bullet_Newb3Matrix3x3DoubleData(){
	b3Matrix3x3DoubleData* wrap_out = new b3Matrix3x3DoubleData();
	return wrap_out;
}

b3Vector3DoubleData** bullet_b3Matrix3x3DoubleData_GetFieldOfM_el(b3Matrix3x3DoubleData* c_this){
	return (b3Vector3DoubleData**)(&c_this->m_el);
}

b3Matrix3x3* bullet_Newb3Matrix3x3(){
	b3Matrix3x3* wrap_out = new b3Matrix3x3();
	return wrap_out;
}

b3Matrix3x3* bullet_Newb3Matrix3x31(b3Quaternion* q){
	b3Quaternion const& c_arg_q=(b3Quaternion const&)(*q);
	b3Matrix3x3* wrap_out = new b3Matrix3x3(c_arg_q);
	return wrap_out;
}

b3Matrix3x3* bullet_Newb3Matrix3x32(float* xx,float* xy,float* xz,float* yx,float* yy,float* yz,float* zx,float* zy,float* zz){
	b3Scalar const& c_arg_xx=(b3Scalar const&)(*xx);
	b3Scalar const& c_arg_xy=(b3Scalar const&)(*xy);
	b3Scalar const& c_arg_xz=(b3Scalar const&)(*xz);
	b3Scalar const& c_arg_yx=(b3Scalar const&)(*yx);
	b3Scalar const& c_arg_yy=(b3Scalar const&)(*yy);
	b3Scalar const& c_arg_yz=(b3Scalar const&)(*yz);
	b3Scalar const& c_arg_zx=(b3Scalar const&)(*zx);
	b3Scalar const& c_arg_zy=(b3Scalar const&)(*zy);
	b3Scalar const& c_arg_zz=(b3Scalar const&)(*zz);
	b3Matrix3x3* wrap_out = new b3Matrix3x3(c_arg_xx,c_arg_xy,c_arg_xz,c_arg_yx,c_arg_yy,c_arg_yz,c_arg_zx,c_arg_zy,c_arg_zz);
	return wrap_out;
}

b3Matrix3x3* bullet_Newb3Matrix3x33(b3Matrix3x3* other){
	b3Matrix3x3 const& c_arg_other=(b3Matrix3x3 const&)(*other);
	b3Matrix3x3* wrap_out = new b3Matrix3x3(c_arg_other);
	return wrap_out;
}

b3Matrix3x3* bullet_b3Matrix3x3_absolute(b3Matrix3x3* c_this){
	b3Matrix3x3 c_out = c_this->absolute();
	b3Matrix3x3* wrap_out = new b3Matrix3x3(c_out);
	return wrap_out;
}

b3Matrix3x3* bullet_b3Matrix3x3_adjoint(b3Matrix3x3* c_this){
	b3Matrix3x3 c_out = c_this->adjoint();
	b3Matrix3x3* wrap_out = new b3Matrix3x3(c_out);
	return wrap_out;
}

float bullet_b3Matrix3x3_cofac(b3Matrix3x3* c_this,int r1,int c1,int r2,int c2){
	int c_arg_r1=r1;
	int c_arg_c1=c1;
	int c_arg_r2=r2;
	int c_arg_c2=c2;
	b3Scalar c_out = c_this->cofac(c_arg_r1,c_arg_c1,c_arg_r2,c_arg_c2);
	float wrap_out = (c_out);
	return wrap_out;
}

void bullet_b3Matrix3x3_deSerialize(b3Matrix3x3* c_this,b3Matrix3x3FloatData* dataIn){
	b3Matrix3x3FloatData const& c_arg_dataIn=(b3Matrix3x3FloatData const&)(*dataIn);
	c_this->deSerialize(c_arg_dataIn);
}

void bullet_b3Matrix3x3_deSerializeDouble(b3Matrix3x3* c_this,b3Matrix3x3DoubleData* dataIn){
	b3Matrix3x3DoubleData const& c_arg_dataIn=(b3Matrix3x3DoubleData const&)(*dataIn);
	c_this->deSerializeDouble(c_arg_dataIn);
}

void bullet_b3Matrix3x3_deSerializeFloat(b3Matrix3x3* c_this,b3Matrix3x3FloatData* dataIn){
	b3Matrix3x3FloatData const& c_arg_dataIn=(b3Matrix3x3FloatData const&)(*dataIn);
	c_this->deSerializeFloat(c_arg_dataIn);
}

float bullet_b3Matrix3x3_determinant(b3Matrix3x3* c_this){
	b3Scalar c_out = c_this->determinant();
	float wrap_out = (c_out);
	return wrap_out;
}

void bullet_b3Matrix3x3_diagonalize(b3Matrix3x3* c_this,b3Matrix3x3* rot,float threshold,int maxSteps){
	b3Matrix3x3& c_arg_rot=(b3Matrix3x3&)(*rot);
	b3Scalar c_arg_threshold=threshold;
	int c_arg_maxSteps=maxSteps;
	c_this->diagonalize(c_arg_rot,c_arg_threshold,c_arg_maxSteps);
}

b3Vector3* bullet_b3Matrix3x3_getColumn(b3Matrix3x3* c_this,int i){
	int c_arg_i=i;
	b3Vector3 c_out = c_this->getColumn(c_arg_i);
	b3Vector3* wrap_out = new b3Vector3(c_out);
	return wrap_out;
}

void bullet_b3Matrix3x3_getEulerYPR(b3Matrix3x3* c_this,float* yaw,float* pitch,float* roll){
	b3Scalar& c_arg_yaw=(b3Scalar&)(*yaw);
	b3Scalar& c_arg_pitch=(b3Scalar&)(*pitch);
	b3Scalar& c_arg_roll=(b3Scalar&)(*roll);
	c_this->getEulerYPR(c_arg_yaw,c_arg_pitch,c_arg_roll);
}

void bullet_b3Matrix3x3_getEulerZYX(b3Matrix3x3* c_this,float* yaw,float* pitch,float* roll,unsigned int solution_number){
	b3Scalar& c_arg_yaw=(b3Scalar&)(*yaw);
	b3Scalar& c_arg_pitch=(b3Scalar&)(*pitch);
	b3Scalar& c_arg_roll=(b3Scalar&)(*roll);
	unsigned int c_arg_solution_number=solution_number;
	c_this->getEulerZYX(c_arg_yaw,c_arg_pitch,c_arg_roll,c_arg_solution_number);
}

b3Matrix3x3* bullet_b3Matrix3x3_getIdentity(b3Matrix3x3* c_this){
	b3Matrix3x3 const& c_out = c_this->getIdentity();
	b3Matrix3x3* wrap_out = (b3Matrix3x3*)(&c_out);
	return wrap_out;
}

void bullet_b3Matrix3x3_getOpenGLSubMatrix(b3Matrix3x3* c_this,float* m){
	b3Scalar * c_arg_m=(b3Scalar *)(void*)(m);
	c_this->getOpenGLSubMatrix(c_arg_m);
}

void bullet_b3Matrix3x3_getRotation(b3Matrix3x3* c_this,b3Quaternion* q){
	b3Quaternion& c_arg_q=(b3Quaternion&)(*q);
	c_this->getRotation(c_arg_q);
}

b3Vector3* bullet_b3Matrix3x3_getRow(b3Matrix3x3* c_this,int i){
	int c_arg_i=i;
	b3Vector3 const& c_out = c_this->getRow(c_arg_i);
	b3Vector3* wrap_out = (b3Vector3*)(&c_out);
	return wrap_out;
}

b3Matrix3x3* bullet_b3Matrix3x3_inverse(b3Matrix3x3* c_this){
	b3Matrix3x3 c_out = c_this->inverse();
	b3Matrix3x3* wrap_out = new b3Matrix3x3(c_out);
	return wrap_out;
}

b3Matrix3x3* bullet_b3Matrix3x3_scaled(b3Matrix3x3* c_this,b3Vector3* s){
	b3Vector3 const& c_arg_s=(b3Vector3 const&)(*s);
	b3Matrix3x3 c_out = c_this->scaled(c_arg_s);
	b3Matrix3x3* wrap_out = new b3Matrix3x3(c_out);
	return wrap_out;
}

void bullet_b3Matrix3x3_serialize(b3Matrix3x3* c_this,b3Matrix3x3FloatData* dataOut){
	b3Matrix3x3FloatData& c_arg_dataOut=(b3Matrix3x3FloatData&)(*dataOut);
	c_this->serialize(c_arg_dataOut);
}

void bullet_b3Matrix3x3_serializeFloat(b3Matrix3x3* c_this,b3Matrix3x3FloatData* dataOut){
	b3Matrix3x3FloatData& c_arg_dataOut=(b3Matrix3x3FloatData&)(*dataOut);
	c_this->serializeFloat(c_arg_dataOut);
}

void bullet_b3Matrix3x3_setEulerYPR(b3Matrix3x3* c_this,float* yaw,float* pitch,float* roll){
	b3Scalar const& c_arg_yaw=(b3Scalar const&)(*yaw);
	b3Scalar const& c_arg_pitch=(b3Scalar const&)(*pitch);
	b3Scalar const& c_arg_roll=(b3Scalar const&)(*roll);
	c_this->setEulerYPR(c_arg_yaw,c_arg_pitch,c_arg_roll);
}

void bullet_b3Matrix3x3_setEulerZYX(b3Matrix3x3* c_this,float eulerX,float eulerY,float eulerZ){
	b3Scalar c_arg_eulerX=eulerX;
	b3Scalar c_arg_eulerY=eulerY;
	b3Scalar c_arg_eulerZ=eulerZ;
	c_this->setEulerZYX(c_arg_eulerX,c_arg_eulerY,c_arg_eulerZ);
}

void bullet_b3Matrix3x3_setFromOpenGLSubMatrix(b3Matrix3x3* c_this,float* m){
	b3Scalar const * c_arg_m=(b3Scalar const *)(void*)(m);
	c_this->setFromOpenGLSubMatrix(c_arg_m);
}

void bullet_b3Matrix3x3_setIdentity(b3Matrix3x3* c_this){
	c_this->setIdentity();
}

void bullet_b3Matrix3x3_setRotation(b3Matrix3x3* c_this,b3Quaternion* q){
	b3Quaternion const& c_arg_q=(b3Quaternion const&)(*q);
	c_this->setRotation(c_arg_q);
}

void bullet_b3Matrix3x3_setValue(b3Matrix3x3* c_this,float* xx,float* xy,float* xz,float* yx,float* yy,float* yz,float* zx,float* zy,float* zz){
	b3Scalar const& c_arg_xx=(b3Scalar const&)(*xx);
	b3Scalar const& c_arg_xy=(b3Scalar const&)(*xy);
	b3Scalar const& c_arg_xz=(b3Scalar const&)(*xz);
	b3Scalar const& c_arg_yx=(b3Scalar const&)(*yx);
	b3Scalar const& c_arg_yy=(b3Scalar const&)(*yy);
	b3Scalar const& c_arg_yz=(b3Scalar const&)(*yz);
	b3Scalar const& c_arg_zx=(b3Scalar const&)(*zx);
	b3Scalar const& c_arg_zy=(b3Scalar const&)(*zy);
	b3Scalar const& c_arg_zz=(b3Scalar const&)(*zz);
	c_this->setValue(c_arg_xx,c_arg_xy,c_arg_xz,c_arg_yx,c_arg_yy,c_arg_yz,c_arg_zx,c_arg_zy,c_arg_zz);
}

float bullet_b3Matrix3x3_tdotx(b3Matrix3x3* c_this,b3Vector3* v){
	b3Vector3 const& c_arg_v=(b3Vector3 const&)(*v);
	b3Scalar c_out = c_this->tdotx(c_arg_v);
	float wrap_out = (c_out);
	return wrap_out;
}

float bullet_b3Matrix3x3_tdoty(b3Matrix3x3* c_this,b3Vector3* v){
	b3Vector3 const& c_arg_v=(b3Vector3 const&)(*v);
	b3Scalar c_out = c_this->tdoty(c_arg_v);
	float wrap_out = (c_out);
	return wrap_out;
}

float bullet_b3Matrix3x3_tdotz(b3Matrix3x3* c_this,b3Vector3* v){
	b3Vector3 const& c_arg_v=(b3Vector3 const&)(*v);
	b3Scalar c_out = c_this->tdotz(c_arg_v);
	float wrap_out = (c_out);
	return wrap_out;
}

b3Matrix3x3* bullet_b3Matrix3x3_timesTranspose(b3Matrix3x3* c_this,b3Matrix3x3* m){
	b3Matrix3x3 const& c_arg_m=(b3Matrix3x3 const&)(*m);
	b3Matrix3x3 c_out = c_this->timesTranspose(c_arg_m);
	b3Matrix3x3* wrap_out = new b3Matrix3x3(c_out);
	return wrap_out;
}

b3Matrix3x3* bullet_b3Matrix3x3_transpose(b3Matrix3x3* c_this){
	b3Matrix3x3 c_out = c_this->transpose();
	b3Matrix3x3* wrap_out = new b3Matrix3x3(c_out);
	return wrap_out;
}

b3Matrix3x3* bullet_b3Matrix3x3_transposeTimes(b3Matrix3x3* c_this,b3Matrix3x3* m){
	b3Matrix3x3 const& c_arg_m=(b3Matrix3x3 const&)(*m);
	b3Matrix3x3 c_out = c_this->transposeTimes(c_arg_m);
	b3Matrix3x3* wrap_out = new b3Matrix3x3(c_out);
	return wrap_out;
}

#ifdef __cplusplus
}
#endif
